package ru.cargobroker.maip.cargo.contracts.service;
/**
 * 
 */



import java.util.Date;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

import ru.cargobroker.maip.base.itest.AbstractTransactionalITest;
import ru.cargobroker.maip.contracts.cargo.domain.CargoDetail;
import ru.cargobroker.maip.contracts.cargo.domain.CargoInsObject;
import ru.cargobroker.maip.contracts.cargo.domain.PackageType;

/**
 *
 * 
 * 
 * @author M.Frendiy
 * @since 0.0.1
 */
public class CargoInsObjectITest extends AbstractTransactionalITest {

	@Test
	@Rollback(value=false) 
	public void test1() {
		CargoDetail cargo = new CargoDetail();
		cargo.setObjectName("name" + new Date());
		cargo.setDangerous(true);
		cargo.setOverall(false);
		cargo.setPackageType(PackageType.BARREL);
		
		CargoInsObject insObject = new CargoInsObject();
		insObject.setCargoDetail(cargo);
		entityManager.persist(insObject);
	}
}
